package com.njtoyo.taxi.admin.service.business.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.mapper.master.mapper.RideRefundLogMapper;
import com.njtoyo.taxi.admin.rest.presenter.business.operation_rule.online_valuation.OnlineValuationPresenter;
import com.njtoyo.taxi.admin.rest.presenter.finance.ride_refund_log.RideRefundLogPresenter;
import com.njtoyo.taxi.admin.service.business.RideRefundLogService;
import com.taxi.entity.common.RestResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class RideRefundLogServiceImpl implements RideRefundLogService {

    @Autowired
    private RideRefundLogMapper rideRefundLogMapper;

    @Override
    public RestResult page(Integer current, Integer size, Map<String, String> params) {
        Page<RideRefundLogPresenter> page = new Page<>(current, size);
        IPage<RideRefundLogPresenter> pages = rideRefundLogMapper.getPageList(page, params);
        return RestResult.success(pages);
    }
}
